import app from "@/app"

export class ProjBasicInfoViewModel {
    projectName: string = ''; // 项目名称
    speciality: string = ''; // 所属学科
    projectSource: string = ''; // 项目来源
    problemSource: string = ''; // 课题来源
    completeMethod: string = ''; // 是否在实验、实践中完成
    labType: string = ''; // 实验室类型
    labName: string = ''; // 实验室名称
    praticeLocation: string = ''; // 拟进行实践的地点
    applyStartDate: string = app.DATE_EMPTY; // 项目开始时间
    applyEndDate: string = app.DATE_EMPTY; // 项目结束时间
    projOwner: string = ''; // 主持人曾经参与科研的情况
    guideTeacher: string = ''; // 指导教师承担科研课题情况
    guideTeacherSupport: string = ''; // 指导教师对本项目的支持情况
    constructor(
        projectName: string = '',
        speciality: string = '',
        projectSource: string = '',
        problemSource: string = '',
        completeMethod: string = '',
        labType: string = '',
        labName: string = '',
        praticeLocation: string = '',
        applyStartDate: string = app.DATE_EMPTY,
        applyEndDate: string = app.DATE_EMPTY,
        projOwner: string = '',
        guideTeacher: string = '',
        guideTeacherSupport: string = ''
    ) {
        this.projectName = projectName;
        this.speciality = speciality;
        this.projectSource = projectSource;
        this.problemSource = problemSource;
        this.completeMethod = completeMethod;
        this.labType = labType;
        this.labName = labName;
        this.praticeLocation = praticeLocation;
        this.applyStartDate = applyStartDate;
        this.applyEndDate = applyEndDate;
        this.projOwner = projOwner;
        this.guideTeacher = guideTeacher;
        this.guideTeacherSupport = guideTeacherSupport;
    }
    static fromModel (model : any) {
    };
}
export class InnovProjBasicInfoViewModel extends ProjBasicInfoViewModel {
    static fromModel (model : any) {
        //TODO 重写
    };
}
export class EntrProjBasicInfo extends ProjBasicInfoViewModel {
    //TODO   企业导师的属性创业训练 & 创业实践特有的信息：
    // 企业导师：参与项目的来自企业的指导人员姓名。
    // 企业导师电话：企业导师的联系方式。
    // 企业导师担任的职务及科研情况：企业导师在企业中的职位以及其科研或业务成就。
    CorpTeacher: string = '';
    CorpTeacherMobile: string = '';
    CorpTeacherPosition: string = '';
    CorpTeacherSciResearch: string = '';
    static fromModel (model : any) {
        //TODO 重写
    };
}

export interface ProjBasicInfo  {
    "ProjectType": string,
    "ProjectName": string,
    "Speciality": string,
    "ProjectCode": string,
    "ProjectLevel": string,
    "ProjectNumber": string,
    "ProjectOrder": number,
    "CompleteMethod": string,
    "LabType": string,
    "LabName": string,
    "PraticeLocation": string,
    "ProblemSource": string,
    "ProjectSource": string,
    "ApplyYear": string,
    "Batch": string,
    "ApplyStartDate": string,
    "ApplyEndDate": string,
    "ProjOwnerId": string,
    "ProjOwnerCode": string,
    "ProjOwner": string,
    "ProjOwnerGender": string,
    "ProjOwnerEthnic": string,
    "ProjOwnerBirthday": string,
    "ProjOwnerMobile": string,
    "ProjOwnerMajor": string,
    "ProjOwnerDepartment": string,
    "ProjOwnerReformType": ""|"无"|"强基计划"|"拔尖计划",
    "GuideTeacherId": string,
    "GuideTeacherCode": string,
    "GuideTeacher": string,
    "GuideTeacherMobile": string,
    "GuideTeacherTitle": string,
    "GuideTeacherEducation": string,
    "GuideTeacherEmail": string,
    "OtherTeacher": string,
    "DepartId": string,
    "DepartName": string,
    "BelongDepartId": string,
    "BelongDepartName": string,
    "WorkflowVersion": string,
    "DeleteMark": 0|1,
    "CreateOn": string,
    "CreateUserId": string,
    "CreateBy": string,
    "Status": number,
    "FullProcessStatus": number,
    "SrcId": string,
    "SrcTimestamp": number,
    "Remark": string
    "ApplyAmount": number,
    "ApprovalAmount": number,
    "Balance": number,
    "ID": string,
    canEdit: boolean,
    canSee: boolean,
    readonly: boolean,
    isNew: boolean,
    /**
     * 此参数是枚举值，0 代表无权访问，10 代表权限为学生，20 代表权限是指导老师，30 代表权限是院管，40 代表权限是教务处
     */
    accessLevel: number,
};

export interface Data {
    [prop: string]: any
};

export const emptyBasicInfo : ProjBasicInfo = {
    canEdit: false,
    canSee: false,
    readonly: true,
    isNew: true,
    accessLevel: 0,
    "ProjectType": "",
    "ProjectName": "",
    "Speciality": "",
    "ProjectCode": "",
    "ProjectLevel": "",
    "ProjectNumber": "",
    "ProjectOrder": 0,
    "CompleteMethod": "",
    "LabType": "",
    "LabName": "",
    "PraticeLocation": "",
    "ProblemSource": "",
    "ProjectSource": "",
    "ApplyYear": "",
    "Batch": "",
    "ApplyStartDate": "",
    "ApplyEndDate": "",
    "ProjOwnerId": app.GUID_EMPTY,
    "ProjOwnerCode": "",
    "ProjOwner": "",
    "ProjOwnerGender": "",
    "ProjOwnerEthnic": "",
    "ProjOwnerBirthday": "",
    "ProjOwnerMobile": "",
    "ProjOwnerMajor": "",
    "ProjOwnerDepartment": "",
    "ProjOwnerReformType": "",
    "GuideTeacherId": app.GUID_EMPTY,
    "GuideTeacherCode": "",
    "GuideTeacher": "",
    "GuideTeacherMobile": "",
    "GuideTeacherTitle": "",
    "GuideTeacherEducation": "",
    "GuideTeacherEmail": "",
    "OtherTeacher": "",
    "DepartId": app.GUID_EMPTY,
    "DepartName": "",
    "BelongDepartId": app.GUID_EMPTY,
    "BelongDepartName": "",
    "WorkflowVersion": "",
    "DeleteMark": 0,
    "CreateOn": "",
    "CreateUserId": app.GUID_EMPTY,
    "CreateBy": "",
    "Status": 0,
    "FullProcessStatus": 0,
    "SrcId": app.GUID_EMPTY,
    "SrcTimestamp": 0,
    "Remark": "",
    "ApplyAmount": 0.00,
    "ApprovalAmount": 0.00,
    "Balance": 0.00,
    "ID": app.GUID_EMPTY
};